Hi all,
The reference manual's function for opening a module requires a specific path as the first input.
Is there a function that I can use that opens all the modules inside a particular project?
Or must it be a loop?
If I did:
Module m = current
for m in current Project do //for all open modules inside the project, not including modules inside another project that is in this main project.
{
Module Mod_Open = edit(m,false)
.
.
.
.
.
Would this idea work? Obviously this syntax gives me an error but is there some similar way of opening all modules without having to specify any path names?
Thanks,
TooDiff
TooDifficult - Sun Dec 05 18:58:26 EST 2010 |
|
Re: Is there a function to open all modules in a Project? pete.kowalski - Mon Dec 06 13:38:17 EST 2010
There isn't one built-in DXL function that does what you want but you can combine some of these functions to make your own. If you need help then reply back.
|
|
Re: Is there a function to open all modules in a Project? pete.kowalski - Mon Dec 06 14:11:07 EST 2010 pete.kowalski - Mon Dec 06 13:38:17 EST 2010
There isn't one built-in DXL function that does what you want but you can combine some of these functions to make your own. If you need help then reply back.
Here is a skeleton on how to do this.
{code}
Item it
string foo
for it in current Project do
{
foo = fullName(it)
if ((type module foo) != "formal")
{
Module m = read(foo,false,true)
}
}
{/code}
|
|
Re: Is there a function to open all modules in a Project? TooDifficult - Mon Dec 06 16:53:59 EST 2010 pete.kowalski - Mon Dec 06 14:11:07 EST 2010
Here is a skeleton on how to do this.
{code}
Item it
string foo
for it in current Project do
{
foo = fullName(it)
if ((type module foo) != "formal")
{
Module m = read(foo,false,true)
}
}
{/code}
Wow thanks a lot for that. Just what I needed.
I was actually thinking of getting a loop to fetch all the names and store it in a skiplist.
Do you need to open a module to do things to it?
Let's say I want to change the inheritance of the objects inside the modules...do I have to open them physically (GUI or DXL) before DOORS will acknowledge and allow a change to the inheritance? Is it possible to change the inheritance of the objects without having to open the module?
Thanks again for this wonderful skeleton. It's certainly more elegant than my initial idea.
TooDiff
|
|
Re: Is there a function to open all modules in a Project? llandale - Mon Dec 06 17:08:21 EST 2010 TooDifficult - Mon Dec 06 16:53:59 EST 2010
Wow thanks a lot for that. Just what I needed.
I was actually thinking of getting a loop to fetch all the names and store it in a skiplist.
Do you need to open a module to do things to it?
Let's say I want to change the inheritance of the objects inside the modules...do I have to open them physically (GUI or DXL) before DOORS will acknowledge and allow a change to the inheritance? Is it possible to change the inheritance of the objects without having to open the module?
Thanks again for this wonderful skeleton. It's certainly more elegant than my initial idea.
TooDiff
You can now see module level attributes without opening a module, but must open the module to see anything about the objects. In this case you'll need to open such mdoule's 'edit'.
You can get the fullName of the module from the 'Item' handle and won't need to open it.
|
|